"""
写一个计算BMI的函数，函数名为 calculate_bmi。
1.可以计算人意体重和身高的BMI值
2.执行过程中打印一句话：您的BMI分类为：xxx
3.返回计算出的BMI值

bmi = weight / height ** 2

BMI分类：
偏瘦：bmi <= 18.5
正常：18.5 < bmi <= 25
偏胖：25 < bmi <= 30
肥胖：bmi > 30
"""
def calculate_bmi(height, weight):
    """ 计算BMI值 """
    bmi = weight / height ** 2
    if bmi <= 18.5:
        category = "偏瘦"
    elif 18.5 < bmi <= 25:
        category = "正常"
    elif 25 < bmi <= 30:
        category = "偏胖"
    else:
        category = "肥胖"
    print("您的BMI分类为：", category)
    return bmi


if __name__ == '__main__':
    bmi = calculate_bmi(1.8, 80)
    print("您的BMI值为：", bmi) 